<template>
	<view class="">
		<navBar title="室内停车"></navBar>
		<view class="top-bg"></view>
		<view class="content">
			<view v-if="list.length">
				<view v-for="item in list" :key="item.plateNumber" class="car-item" @click="handleSelect(item)">
					<view class="car-item-left">
						<image class="car-sign" v-if="item.plateNumber.length===7" :src="bg_image.logo1"></image>
						<image class="car-sign" v-if="item.plateNumber.length===8" :src="bg_image.iconNcar">
						</image>
						<view :class="{'blue':item.plateNumber.length===7}">{{item.plateNumber || ''}}</view>
					</view>
					<image class="icon-del" :src="bg_image.iconDel" @click.stop="handleDelete(item)"></image>
					<view class="tag" v-if="item.defaultFlag===1" :class="{'green':item.plateNumber.length===8}">默认
					</view>
				</view>
			</view>
			<view class="page-result" v-else>
				<image class="page-result-icon" :src="bg_image.emptyCar"></image>
				<view class="page-result-msg">您还没有绑定车牌</view>
			</view>
			<view class="add" @click="addCar">+添加车牌</view>
		</view>
		<!-- 键盘 -->
		<plateInput :plate="plate" @export="handleExport" @close="handleClose" v-if="showPlateInput"></plateInput>
	</view>
</template>

<script>
	import myCar from './js/myCar'
	
	import plateInput from './components/plateInput/uni-plate-input.vue'
	export default {
		components: {
		  plateInput
		},
		...myCar
	}
</script>

<style lang="less" scoped>
	@import url('./css/myCar.less');
</style>